package com.org.service.impl;

import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.org.dao.IProductCategoryDao;
import com.org.model.ProductCategory;
import com.org.service.IProductCategoryService;

@Service
public class ProductCategoryServiceImpl implements IProductCategoryService{
	@Resource
	private IProductCategoryDao productCategoryDao; 
	
	@Override
	public void deleteProductCategoryById(String primaryKey) throws Exception {
		productCategoryDao.deleteProductCategoryById(primaryKey);
	}

	@Override
	public ProductCategory getProductCategoryById(String primaryKey) throws Exception {
		return productCategoryDao.getProductCategoryById(primaryKey);
	}

	@Override
	public boolean getIsExistProductCategory(String category) throws Exception {
		
		return productCategoryDao.getIsExistProductCategory(category);
	}

	@Override
	public Map<String, Object> getProductCategoryLists( Map<String, Object> params) throws Exception {
		return productCategoryDao.getProductCategoryLists(params);
	}

	@Override
	public void insertProductCategory(ProductCategory entity) throws Exception {
		productCategoryDao.insertProductCategory(entity) ;
	}

	@Override
	public void updateProductCategoryById(ProductCategory entity) throws Exception {
		productCategoryDao.updateProductCategoryById(entity);
	}

	
}
